package com.xinqi.modules.exam.student.client;

import com.xinqi.common.base.constants.ServiceNameConstants;
import com.xinqi.common.base.response.PageInfo;
import com.xinqi.common.base.response.R;
import com.xinqi.modules.exam.student.dto.req.CourseExamPaperStudentBatchDelDTO;
import com.xinqi.modules.exam.student.dto.req.CourseExamPaperStudentQueryDTO;
import com.xinqi.modules.exam.student.dto.rsp.CourseExamPaperStudentResultDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 课程测评学生答题客户端
 *
 * @author: linkai
 * @date: 2023/07/02
 */
@FeignClient(contextId = "courseExamPaperStudentClient", value = ServiceNameConstants.XQ_EXAM)
public interface CourseExamPaperStudentClient {
    String INNER_PREFIX = "/inner/exam-paper/student";

    /**
     * 课程测评学生答题-分页
     */
    @GetMapping(INNER_PREFIX + "/page")
    R<PageInfo<CourseExamPaperStudentResultDTO>> page(CourseExamPaperStudentQueryDTO dto);

    /**
     * 课程测评学生答题-详情
     */
    @GetMapping(INNER_PREFIX + "/{id}")
    R<CourseExamPaperStudentResultDTO> findById(@PathVariable("id") Long id);

    /**
     * 批量删除用户试卷
     */
    @PutMapping(INNER_PREFIX + "/batch-del-user")
    R<Boolean> batchDelUser(@RequestBody CourseExamPaperStudentBatchDelDTO dto);

}
